<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>更改信息</title>
<link href="css_body.css" rel="stylesheet" type="text/css" />
<script language='javascript' src='../include/common.js'></script>
<script language="javascript">
<!--
<?php
echo $areacache;
echo $sectorcache;
?>
function checkSubmit()
{
  if(document.form1.title.value==""){
	    alert("标题不能为空！");
	    document.form1.title.focus();
	    return false;
  }
  if(document.form1.typeid.value==0){
	   alert("请选择档案的主类别！");
	   return false;
  }
  if(document.form1.sectorchange.checked
  || document.form1.areachange.checked)
  {
	    if (!confirm("您选择了更改行业或者地区，请确认吗？")) return false;
  }
}

-->
</script>
</head>
<body topmargin="8">
<table width="96%" border="0" cellpadding="1" cellspacing="1" align="center" class="tbtitle" style="	background:#E2F5BC;">
    <tr>
      <td height="30">&nbsp;<a href="catalog_do.php?cid=<?php echo $info['typeid']?>&dopost=listArchives"><strong><u>●信息列表</u></strong></a>&gt;&gt;更改信息</td>
      <td align="right">&nbsp; <a href="catalog_main.php">[<u>栏目管理</u>]</a> </td>
    </tr>
  </table>
<form name="form1" action="action/info_edit_action.php" enctype="multipart/form-data" method="post" onSubmit="return checkSubmit();">
<input type="hidden" name="channelid" value="<?php echo $channelid?>">
<input type="hidden" name="step" value="2">
<input type="hidden" name="ID" value="<?php echo $aid?>">
<input type="hidden" name="edadminid" value="<?php echo $adminid?>" >
<input type="hidden" name="senddate" value="<?php echo $info['senddate']?>">
<table width="96%" border="0" cellpadding="1" cellspacing="1" align="center" class="tbtitle" style="	background:#E2F5BC;">
  <tr>
    <td bgcolor="#FFFFFF"><table width="100%" border="0" align="center" cellpadding="0" cellspacing="0" bgcolor="#E2F5BC" class="htable" id="head1">
      <tr>
        <td colspan="2" bgcolor="#EDF9D5"><table width="84" border="0" cellpadding="0" cellspacing="0">
          <tr>
            <td width="84" height="24" align="center" bgcolor="#FFFFFF">&nbsp;<strong>常规参数</strong>&nbsp;</td>
            </tr>
        </table></td>
      </tr>
    </table>
        <table width="98%"  border="0" align="center" cellpadding="2" cellspacing="2" id="needset">
          <tr>
            <td width="400%" height="28" colspan="4" class="bline"><table width="800" border="0" cellspacing="0" cellpadding="0">
                <tr>
                  <td width="90" height="22">标题：</td>
                  <td><input name=title type=text value="<?php echo $info['title']?>" size="50" />　
                    推荐
                    <input name="iscommend" type="checkbox" id="iscommend" value="11" <?php  if($info["iscommend"]>10) echo " checked";?> />
加粗
<input name="isbold" type="checkbox" id="isbold" value="5" <?php  if($info["iscommend"]==5||$info["iscommend"]==16) echo " checked";?> /></td>
                </tr>
            </table></td>
          </tr>
          <tr>
            <td height="28" colspan="4" class="bline"><table width="800" border="0" cellspacing="0" cellpadding="0">
              <tr>
                <td width="90">Tag标签：</td>
                <td><input name="oldtag" type="hidden" id="oldtag" value="<?php echo $tags; ?>" />
                  <input name="tag" type="text" id="tag" style="width:300px" value="<?php echo $tags; ?>" />
(用空格或','分开) </td>
              </tr>
            </table></td>
          </tr>
          <tr>
            <td height="28" colspan="4" class="bline" id="redirecturltr" style="display:none"><table width="800" border="0" cellspacing="0" cellpadding="0">
                <tr>
                  <td width="90" height="22">文章排序：</td>
                  <td width="240"><select name="sortup" id="sortup" style="width:150">
                    <?php
$subday = SubDay($info["sortrank"],$info["senddate"]);
echo "<option value='0'>正常排序</option>\r\n";
if($subday>0) echo "<option value='$subday' selected>置顶 $subday 天</option>\r\n";
?>
                    <option value="7">置顶一周</option>
                    <option value="30">置顶一个月</option>
                    <option value="90">置顶三个月</option>
                    <option value="180">置顶半年</option>
                    <option value="360">置顶一年</option>
                  </select></td>
                  <td width="90">有效期：</td>
                  <td><input type=text name=endtime value="<?php echo $info['endtime']?>" style="width:100px" />
天</td>
                </tr>
            </table></td>
          </tr>
          <tr>
            <td height="28" colspan="4" class="bline"><table width="800" border="0" cellpadding="0" cellspacing="0" id="pictable">
              <tr>
                <td width="100" height="81">缩 略 图：</td>
                <td width="410"><input name="picname" type="text" id="picname" style="width:280px" value="<?php echo $info["litpic"]?>" />
                    <input type="button" name="Submit" value="浏览..." style="width:60" onclick="SelectImage('form1.picname','');" class="inputbut" />
                </td>
                <td width="290"><img src="<?php if($info["litpic"]!="") echo $info["litpic"]; else echo "img/pview.gif";?>" width="150" height="100" id="picview" name="picview" /> </td>
              </tr>
            </table></td>
          </tr>
          <tr>
            <td height="28" colspan="4" class="bline"><table width="800" border="0" cellspacing="0" cellpadding="0">
                <tr>
                  <td width="90" height="22">关键词：</td>
                  <td width="240"><input type=text name=keywords value="<?php echo $info['keywords']?>" style="width:200px" /></td>
                  <td width="90">文章摘要：</td>
                  <td><textarea name="description" rows="3" id="description" style="width:200px"><?php echo $info['description']; ?></textarea></td>
                </tr>
            </table></td>
          </tr>
          <tr id="pictable">
            <td height="24" colspan="4" class="bline"><table width="800" border="0" cellspacing="0" cellpadding="0">
                <tr>
                  <td width="90" height="22">选择栏目：</td>
                  <td width="240"><?php
$dsql = new DedeSql(false);
$seltypeids = $dsql->GetOne("Select ID,typename From #@__arctype where ID='".$info["typeid"]."' ");
if(is_array($seltypeids))
{
	echo GetTypeidSel('form1','typeid','selbt1',-2, $info['typeid'], $info['typename']);
}
?></td>
                  <td width="90">小分类：</td>
                  <td><select name="smalltypeid">
                    <option value="0">-不限-</option>
                    <?php echo $smalltypes;?>
                  </select></td>
                </tr>
            </table></td>
          </tr>
          <tr>
            <td height="28" colspan="4" class="bline"><table width="800" border="0" cellspacing="0" cellpadding="0">
                <tr>
                  <td width="90" height="22">选择地区：</td>
                  <td width="240"><?php echo $areaidname; ?> - <?php echo $areaid2name; ?>
                    <input type="checkbox" name="areachange" onclick="javascript:showonobj('area',this.name)" />
更改地区
<input type="hidden" name="oldareaid" value="<?php echo $info[areaid]; ?>" />
<input type="hidden" name="oldareaid2" value="<?php echo $info[areaid2]; ?>" />
<div id="area" style="display:none;">
  <select name="areaid" id="areaid" onchange="javascript:selNext(this.document.form1.areaid2,this.value,'subareas')">
    <option value="0">--不限--</option>
    <?php
$dsql->SetQuery("Select * From #@__area where reid=0");
$dsql->Execute();
while($area = $dsql->GetArray())
{
	echo "<option value='".$area['id']."'>".$area['name']."</option>\r\n";
}
?>
  </select>
  <select name="areaid2" id="areaid2">
    <option value="0">--不限--</option>
  </select>
</div></td>
                  <td width="90">选择行业：</td>
                  <td><?php echo $sectoridname; ?> - <?php echo $sectorid2name; ?>
                    <input type="checkbox" name="sectorchange" onclick="javascript:showonobj('sector',this.name)" />
更改主营行业
<input type="hidden" name="oldsectorid" value="<?php echo $info[sectorid]; ?>" />
<input type="hidden" name="oldsectorid2" value="<?php echo $info[sectorid2]; ?>" />
<div id="sector" style="display:none;">
  <select name="sectorid" id="sectorid" onchange="javascript:selNext(this.document.form1.sectorid2,this.value,'subsectors')">
  <option value="0">--不限--</option>
                  <?php
$dsql->SetQuery("Select * From #@__sectors where reid=0");
$dsql->Execute();
while($sector = $dsql->GetArray())
{
	echo "<option value='".$sector['id']."'>".$sector['name']."</option>\r\n";
}
?>
  </select>
  <select name="sectorid2" id="sectorid2">
   <option value="0">--不限--</option>
   </select>
</div></td>
                </tr>
            </table></td>
          </tr>
          <tr>
            <td height="28" colspan="4" class="bline"><table width="800" border="0" cellspacing="0" cellpadding="0">
                <tr>
                  <td width="90" height="22">自定义属性：</td>
                  <td width="240"><select name='arcatt' style='width:150px'>
                    <option value='0'>普通文档</option>
                    <?php
$dsql->SetQuery("Select * From #@__arcatt order by att asc");
$dsql->Execute();
while($trow = $dsql->GetObject())
{
if($info["arcatt"]==$trow->att) echo "<option value='{$trow->att}' selected>{$trow->attname}</option>";
else echo "<option value='{$trow->att}'>{$trow->attname}</option>";
}
?>
                  </select></td>
                  <td width="90">发布时间：</td>
                  <td><?php
$nowtime = GetDateTimeMk($info["pubdate"]);
echo "<input name=\"pubdate\" value=\"$nowtime\" type=\"text\" id=\"pubdate\" style=\"width:200px\" />";
?></td>
                </tr>
            </table></td>
          </tr>
          <tr>
            <td height="28" colspan="4" class="bline"><table width="800" border="0" cellspacing="0" cellpadding="0">
                <tr>
                  <td width="90" height="22">联系人：</td>
                  <td width="240"><input type=text name=contact value="<?php echo $info['contact']?>" style="width:200px" /></td>
                  <td width="90">传真：</td>
                  <td><input type=text name=fax value="<?php echo $info['fax']?>" style="width:200px" /></td>
                </tr>
            </table></td>
          </tr>
          <tr>
            <td height="24" colspan="4" class="bline"><table width="800" border="0" cellspacing="0" cellpadding="0">
                <tr>
                  <td width="90" height="22">电话：</td>
                  <td width="240"><input type=text name=phone value="<?php echo $info['phone']?>" style="width:200px" /></td>
                  <td width="90">地址：</td>
                  <td><input type=text name=address value="<?php echo $info['address']?>" style="width:200px" /></td>
                </tr>
            </table>
            </td>
          </tr>
          <tr>
            <td height="28" colspan="4" bgcolor="#FFFFFF" class="bline"><table width="800" border="0" cellspacing="0" cellpadding="0">
                <tr>
                  <td width="90" height="22">Email：</td>
                  <td width="240"><input type=text name=email value="<?php echo $info['email']?>" style="width:200px" /></td>
                  <td width="90">QQ：</td>
                  <td><input type=text name=qq value="<?php echo $info['qq']?>" /></td>
                </tr>
            </table></td>
          </tr>
          <tr>
            <td height="24" colspan="4" class="bline"><table width="800" border="0" cellspacing="0" cellpadding="0">
                <tr>
                  <td width="90" height="22">MSN：</td>
                  <td width="240"><input type=text name=msn value="<?php echo $info['msn']?>" style="width:200px" /></td>
                  <td width="90">&nbsp;</td>
                  <td>&nbsp;</td>
                </tr>
            </table></td>
          </tr>
          <tr>
            <td>
              <?php
                PrintAutoFieldsEdit($cInfos['fieldset'],$addRow,'autofield');
              ?>
            </td>
          </tr>
        </table>
        <table width="100%" border="0" align="center" cellpadding="0" cellspacing="0" bgcolor="#E2F5BC" id="head2" style="border-top:1px solid #E2F5BC;">
          <tr>
            <td colspan="2" bgcolor="#EDF9D5"><table width="84" height="24" border="0" cellpadding="0" cellspacing="0">
                <tr>
                  <td width="84" align="center" bgcolor="#FFFFFF"><strong>信息内容</strong></td>
                </tr>
            </table></td>
          </tr>
        </table>
      <table width="98%" border="0">
          <tr>
            <td><table width="800" border="0" cellspacing="0" cellpadding="0">
              <tr>
                <td width="90">&nbsp;附加选项：</td>
                <td><input name="remote" type="checkbox"  id="remote" value="1" />
                  下载远程图片和资源

                  <input name="autolitpic" type="checkbox"  id="autolitpic" value="1" />
                  提取第一个图片为缩略图
                  <input name="autokey" type="checkbox"  id="autokey" value="1" />
                  自动获取关键词 </td>
              </tr>
            </table></td>
          </tr>
          <tr>
            <td><?php
	GetEditor("body",$body,450);
	?></td>
          </tr>
          <tr>
            <td height="35" align="center"><input name="imageField" type="submit" class="inputbut" value="确定" />
                &nbsp;&nbsp;
                <input name="button" type="reset" class="inputbut" id="button" value="重置"/></td>
          </tr>
      </table></td>
  </tr>
</table>
</form>
<?php
$dsql->Close();
?>
</body>
</html>